package com.example.wlt.personnel_manegement_system.Manager.My;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;

import com.example.wlt.personnel_manegement_system.Login.Login;
import com.example.wlt.personnel_manegement_system.Manager.Org.Organization;
import com.example.wlt.personnel_manegement_system.Manager.Org.search;
import com.example.wlt.personnel_manegement_system.Manager.Person.Person;
import com.example.wlt.personnel_manegement_system.Manager.Task.Task;
import com.example.wlt.personnel_manegement_system.R;

/**
 * Created by WLT on 2016/4/22.
 */
public class Mycenter extends Activity {
    private ImageButton ibtn_org;//部门
    private ImageButton ibtn_person;//人员
    private ImageButton ibtn_task;//任务
    private Button btn_back;//返回按钮
  //  private TextView tv_updacc;//修改账号
    private TextView tv_updpsd;//修改密码
    private TextView tv_perinf;//个人信息
    private TextView tv_switchacc;//切换账号
    private TextView tv_exit;//退出
    private ImageButton ibtn_search;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.mycenter);
        ibtn_org=(ImageButton)findViewById(R.id.ibtn_org);
        ibtn_person=(ImageButton)findViewById(R.id.ibtn_person);
        ibtn_task=(ImageButton)findViewById(R.id.ibtn_task);
     //   tv_updacc=(TextView)findViewById(R.id.tv_my_updaccount);
        tv_updpsd=(TextView)findViewById(R.id.tv_my_updpsd);
        tv_perinf=(TextView)findViewById(R.id.tv_my_perinf);
        tv_switchacc=(TextView)findViewById(R.id.tv_my_switchaccount);
        tv_exit=(TextView)findViewById(R.id.tv_my_exit);
        btn_back=(Button)findViewById(R.id.btn_org_headleft);
        ibtn_search=(ImageButton)findViewById(R.id.ibtn_org_search);
        ibtn_search.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent Intent=new Intent(Mycenter.this, search.class);
                startActivity(Intent);
            }
        });
        //进入部门页面
        ibtn_org.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent Intent=new Intent(Mycenter.this,Organization.class);
                startActivity(Intent);
                finish();
            }
        });
        //进入人员页面
        ibtn_person.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent Intent=new Intent(Mycenter.this,Person.class);
                startActivity(Intent);
                finish();
            }
        });
        //进入任务页面
        ibtn_task.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent Intent=new Intent(Mycenter.this,Task.class);
                startActivity(Intent);
                finish();
            }
        });
        //返回app首页即部门页面
        btn_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent Intent=new Intent(Mycenter.this,Organization.class);
                startActivity(Intent);
                finish();
            }
        });
      /*  tv_updacc.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               Intent Intent=new Intent(Mycenter.this,Changeaccount.class);
                startActivity(Intent);
            }
        });*/
        //进入修改密码页面
        tv_updpsd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent Intent=new Intent(Mycenter.this,Changepsd.class);
                startActivity(Intent);
            }
        });
        //进入个人信息界面
        tv_perinf.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent Intent=new Intent(Mycenter.this,Checkinfor.class);
                startActivity(Intent);
            }
        });
        //返回登陆界面
        tv_switchacc.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent Intent=new Intent(Mycenter.this, Login.class);
                startActivity(Intent);
                finish();

            }
        });
        //退出登录
        tv_exit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
